package day06;

import java.util.Scanner;

public class HouseTax {

    public static void main(String[] args) {
        try (// 输入
		Scanner scanner = new Scanner(System.in)) {
			// 购房次数
			int houseNumber = scanner.nextInt();
			// 房款（单位万元）
			int roomPay = scanner.nextInt()*10000;
			// 评估价（单位万元）
			int appraisal = scanner.nextInt()*10000;
			// 房屋面积
			double houseSize = scanner.nextDouble();
			// 声明契税变量
			double deedTax = 0.0;
			
			// 判断是否属于首次购房
			if (houseNumber == 1) {
			    if (houseSize <= 90) {
			        // 计算契税
			        deedTax = appraisal * 0.01;
			    } else if (houseSize <= 144) {
			        // 计算契税
			        deedTax = appraisal * 0.0015;
			    } else if (houseSize > 144) {
			        // 计算契税
			        deedTax = appraisal * 0.03;
			    }
			} else {
			    // 计算契税
			    deedTax = appraisal * 0.03;
			}
			// 印花税
			double stampDuty = roomPay * 0.0005;
			// 交易费
			double transactionFee = houseSize* 3;
			// 测绘费
			double paintingFee = houseSize * 1.36;
			// 输出
			System.out.printf("%.1f %.1f %.1f %.1f",deedTax, stampDuty, transactionFee, paintingFee);
		}
    }
}
